package com.xy.count.controller;
import com.xy.common.base.controller.BaseController;
import com.xy.common.base.entity.AjaxResult;
import com.xy.jm.service.JmUserService;
import com.xy.zqb.service.ZqbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
public class CountController extends BaseController {
    @Autowired
    private JmUserService jmUserService;
    @Autowired
    private ZqbUserService zqbUserService;
    @RequestMapping("count/user_num")
    public AjaxResult UserNum(){
        Map<String,Object> data=new HashMap<>();
        data.put("total_jm_user_num",jmUserService.count());
        data.put("total_zqb_user_num",zqbUserService.count());
        return success(data);
    }
}
